package fr.playsoft.psas.parcel;

import java.util.ArrayList;

import android.app.ListActivity;
import android.os.Bundle;
import android.widget.ArrayAdapter;

public class Parcel4 extends ListActivity {
    	
	/** Called when the activity is first created. */
	public void onCreate(Bundle icicle) {
		super.onCreate(icicle);
		
		ArrayList<ComplexObj1> items = getIntent().getParcelableArrayListExtra("_compList");
		
		if(items == null)
			throw new IllegalArgumentException("Why ComplexObj1 Parcelable is NULL?");
		
		String[] data = new String[items.size()];
		for(int i = 0; i < items.size(); i++) {
			data[i] = items.get(i).toString();
		}
		
		this.setListAdapter(new ArrayAdapter<String>(this,
				android.R.layout.simple_list_item_1, data));
	}

	
}